import req from '../fetch/index.js'

const config = {
  // 获取分页表格信息
    getTableData: {
        url: '/pc/good/listGood',
        method:'post'
  },
  // 新增商品
  addGoods: {
    url: '/pc/good/addGood',
    method:'post'
  },
  // 获取要修改商品信息
  getChangeInfo: {
    url: '/pc/good/getGood',
    method:"post"
  },
// 修改商品
editGoodInfo: {
  url: 'pc/good/updateGood',
  method:"post"
  },
// 删除商品
deleteGoods: {
  url: '/pc/good/deleteGood',
  method:'post'
  },
  // 修改商品状态
  updateGoodStatus: {
    url: '/pc/good/updateGoodStatus',
    method:'post'
  },
  // 查询商品分类下拉框数据
selectGoodClass: {
  url: '/pc/goodClass/selectGoodClass',
  method:'post'
  }
}

const request = function (funcName, requestParam) {
  return req(config[funcName].url, config[funcName].method, requestParam, {}, config[funcName].fileConfig)
}
export default request
